package com.eshop.dao.Impl;

import com.eshop.dao.PicDao;
import com.eshop.model.Pic;

import java.util.List;

public class PicDaoImpl extends BaseDao implements PicDao {
    @Override
    public Pic queryPicById(int id) {
        String sql = "select * from t_pic where pic_id = ?";
        return queryForOne(Pic.class,sql,id);
    }

    @Override
    public List<Pic> queryPicByGoodsId(int id) {
        String sql = "select * from t_pic where goods_id = ?";
        return queryForList(Pic.class,sql,id);
    }
}
